import { defineStore } from 'pinia'
export const useStore = defineStore('userStore', {
  state: () => {
    return {
        userName:'test',
    }
  },
  getters: {
    getUserName:(state)=>state.userName,
  },
  actions: {
    setUserName(userName:string){
        this.userName =  userName;
    }
  },
  persist: {
    enabled: true, // 开启数据缓存
    }
})
